{% extends "BillingBundle::admin_layout.html.twig" %}

{% macro field(row, lname, label) %}
    <tr>
        <td class="label">
            <label id="l{{ lname }}" for="{{ lname }}">{{ label }}:</label>
        </td>
        <td class="field">
            {{ form_widget(row) }}
        </td>
        <td class="status"></td>
        <td>
            {{ form_errors(row) }}
        </td>
    </tr>
{% endmacro %}

{% block content %}

<link rel="stylesheet" type="text/css" media="screen" href="{{ asset('bundles/billing/css/validate.css') }}" />
<script src="{{ asset('bundles/billing/js/jquery.js') }}" type="text/javascript"></script>
<script src="{{ asset('bundles/billing/js/jquery.validate.js') }}" type="text/javascript"></script>
<script src="{{ asset('bundles/billing/js/validate_bonus_table.js') }}" type="text/javascript"></script>

<h4>Выдача бонуса:</h4>

<div id="add_box">
  <div id="add_wrap">
    <form id="add_form" method="post" action="#">
        <table>
           {{ _self.field(form.user_id, 'user_id', 'Пользователь') }}
           {{ _self.field(form.bonus_id, 'bonus_id', 'Бонус') }}
           {{ _self.field(form.is_active, 'is_active', 'Активен') }}
           {{ form_widget(form._token) }}
        <tr>
            <td>
            <div class="field">
                <input name="add_bonus_table" type="submit" value="Выдать"/>
            </div>
            </td>
        </tr>
        </table>
    </form>
   </div>
</div>


{% endblock %}
